{include file="common/head"/}
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    </script>
    {include file="common/left"}
    <div class="main-content">
        <div class="main-content-inner">
            {include file="common/header_nav"}
            <div class="page-content">
                <div style="padding-bottom: 15px;">
                    <a href="{:url('index')}" class="btn btn-xs {if condition="input('type') eq ''"}btn-danger{/if}">{:strtoupper($viewSuffix)}</a>
                    <a href="{:url('index',array('type'=>'css'))}" class="btn btn-xs {if condition="input('type') eq 'css'"}btn-danger{/if}">CSS</a>
                    <a href="{:url('index',array('type'=>'js'))}" class="btn btn-xs {if condition="input('type') eq 'js'"}btn-danger{/if}">JS</a>
                    <a href="{:url('images')}" class="btn btn-xs">媒体文件</a>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <div class="table-responsive">
                            <table id="simple-table" class="table table-striped table-bordered table-hover center">
                                <thead>
                                <tr>
                                    <th class="center">文件名称</th>
                                    <th class="center">文件大小</th>
                                    <th class="center visible-lg visible-md">修改时间</th>
                                    <th class="center" style="border-right:#CCC solid 1px;">管理操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="templates" id="v"}
                                <tr>
                                    <td class="text-left">{$v.filename}</td>
                                    <td class="text-left">{$v.filesize}</td>
                                    <td class="visible-lg visible-md">{$v.filemtime|date='Y-m-d h:i:s',###}</td>
                                    <td>
                                        <div class="action-buttons">
                                            <a class="green" href="{:url('edit',['file'=>$v['filename'],'type'=>input('param.type')])}" title="修改">
                                                <i class="ace-icon fa fa-pencil bigger-130"></i> </a>
                                            <a class="red" href="javascript:;" onclick="return del('{$v[filename]}');" title="删除">
                                                <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                <tr>
                                    <td colspan="8" align="left">&nbsp;</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {include file="common/foot" /}
</div>

<!-- inline scripts related to this page -->
<script type="text/javascript">
    function del(file) {
        layer.confirm('你确定要删除吗？', {icon: 3}, function (index) {
            layer.close(index);
            window.location.href = "{:url('delete')}?file=" + file;
        });
    }
</script>
</body>
</html>
